<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="../template/template.xhtml">


<ui:define name="conteudo">

<h:form id="formPagamento">

		<p:growl id="messages" showDetail="true" life="3000" />

		<p:panel header="Pagamento - Apartamento : #{hospedagemBean.apartamentoSelecionado.numero}">
		
		<h:panelGrid columns="2" cellpadding="5" >			
			
			<h:outputText value="Valor Apartamento: " />
			<p:inputText  value="#{hospedagemBean.hospedagem.valorServico}" required="false" />
			<h:outputText value="Valor Consumido: " />
			<p:inputText  value="#{hospedagemBean.hospedagem.consumo.valorConsumo}" required="false"/>
			<h:outputText value="Valor Adicional: " />
			<p:inputText  value="#{hospedagemBean.hospedagem.tempoOcupacao.valorTempoAdicional}" required="false" />
			<h:outputText value="Valor Total: " />
			<p:inputText  value="#{pagamentoBean.pagamento.valorTotal}" required="false" />
			
			<h:outputText value="Tipo de pagamento: " />
			<p:selectOneRadio value="#{pagamentoBean.pagamento.tipoPagamento}">
                <f:selectItems value="#{pagamentoBean.tipopagamento}" />              
            </p:selectOneRadio>
            
		</h:panelGrid>
		
		
		<p:separator />
		<p:commandButton value="Calcular"  action="#{pagamentoBean.fazerConta}" update="@(form:visualizar)" />
		<p:commandButton value="Pagar"  action="#{pagamentoBean.pagar}" update="@(form:visualizar)" />
		
		
		</p:panel>
</h:form>
</ui:define>
</ui:composition>
</html>